﻿

using System.Data.Entity.ModelConfiguration;
using ProjetoComperio.DataLayer.Entities;

namespace ProjetoComperio.DataLayer.Configuration
{
    public class EventConfiguration : EntityConfiguration<Event>
    {
        public EventConfiguration()
        {
            Property(e => e.ContributionID).IsIdentity();
            MapHierarchy(
               e => new

               {
                   e.ContributionID,
                   e.SourceInfo,
                   e.RegisterDate,
                   e.Title,
                   e.Description,
                   e.Subject,
                   e.Location,
                   e.Details,
                   e.StartDate,
                   e.EndDate,
                   e.Author,
                   e.AuthorDescription
               }
             ).ToTable("Event");
        }
    }
}
